package com.isay.frameworklib.utils;

import android.app.Activity;
import android.content.Context;
import android.util.DisplayMetrics;

/**
 * Created by cywu4 on 2018/9/3.
 */

public class ScreenUtils {


    private static float screenWidth = 0;

    private static float screenHeight = 0;

    public static void setScreenSize(Activity context) {
        DisplayMetrics dm = new DisplayMetrics();
        context.getWindowManager().getDefaultDisplay().getMetrics(dm);
        screenWidth = dm.widthPixels;
        screenHeight = dm.heightPixels;
    }

    public static float getScreenWidth() {
        return screenWidth;
    }

}
